import React, { FC, useEffect, useState } from 'react'
import Header from '@/components/home/header'
import { useAppSelector, useAppDispatch } from '@/store'
import { initCurrendStdAdd } from '@/store/address'
import { selectPayParam, selectPayPrice } from '@/store/payCenter'
import { useNavigate } from 'react-router-dom'
import buyUrl from '@/assets/images/buySuccess.png'
/**
 * 支付状态页面
 */
const welfare: FC<{}> = () => {
  const navigate = useNavigate()
  const dispatch = useAppDispatch()
  const prise = useAppSelector(selectPayPrice)
  useEffect(() => {}, [])
  //https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx141421524184578a811adb697f164e0000&package=553572278
  //initCurrendStdAdd
  return (
    <div className="w-full h-full ">
      <Header
        cb={() => {
          navigate(-1)
        }}
        headerText={'已在支付中'}
      ></Header>
      <div className=" pt-r6.2 pb-r2.2 pl-r1.2 pr-r1.2 h-auto w-full text-center  relative">
        <div>
          <img
            alt=""
            className="w-r9.1 h-auto relative left-1/2 transform -translate-x-1/2 "
            src={buyUrl}
          ></img>
          <p className="block text-r2.0 leading-r2.0 text-gray-666666 pt-r1.5 ">已在支付中</p>
        </div>
      </div>
      <div>
        <div className="h-r5.9 text-r1.6 leading-r5.9 w-full relative text-center">
          <span
            onClick={() => {
              navigate('/payStatus')
            }}
            className=" shadow-bs4  text-r1.5 border leading-r4.0 h-r4.0 w-r11.2 text-orange-FF3627 leading-r4.0 rounded-r2.0  inline-block text-center mr-r1.6"
          >
            查看详细
          </span>
        </div>
      </div>
    </div>
  )
}

export default welfare
